Skip to main content

libURLLastHTTPHeaders

Type

function

Summary

Returns the value of the httpHeaders property used for the previous HTTP request.

Syntax

libURLLastHTTPHeaders()

Description

Use the libURLLastHTTPHeaders function to debug problems with HTTP transfers, or to report errors to advanced users.

You can set the httpHeaders property to send custom headers in addition to the default headers. Whenever LiveCode contacts a web server to download a page (with the load command or by using a URL in an expression) or to post data (with the post command), the contents of the httpHeaders property is sent to the web server. The libURLLastHTTPHeaders function returns the last set of custom headers used.

Important

The libURLLastHTTPHeaders function is part of the Internet library. To ensure that the function works in a standalone application, you must include this custom library when you create your standalone. In the Inclusions pane of the Standalone Application Settings window, make sure the "Internet" script library is selected.

Examples

put libURLLastHTTPHeaders() into headersToAnalyze
if probReq is among the lines of libURLLastHTTPHeaders() then tryAgain

command: post, libURLSetCustomHTTPHeaders, libURLFollowHttpRedirects, load

control structure: function

function: libURLLastRHHeaders, value

glossary: LiveCode custom library, property, return, web server, Standalone Application Settings, download, standalone application, expression, command

keyword: URL, http

library: Internet library

property: httpHeaders

Compatibility and Support

Introduced

LiveCode 1.1.1

OS

mac

windows

linux

web

Platforms

desktop

server

Thank you for your feedback!

Was this page helpful?